/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.bsa.soft.i18nparser;

import cz.bsa.soft.i18nparser.core.I18nProperty;
import cz.bsa.soft.i18nparser.core.Parser;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Set;


/**
 * Use this class to extract all used i18n properties from your source files
 *
 * @author Vladimír Duša
 */
public class I18nPropertiesParser {
    /**
     * Use this function to retreive list of i18n codes from a given file.
     * @param fileName File to be scanned
     * @return Returns set containing list of properties I18nProperty
     * @throws FileNotFoundException Whenever fileName doesn't exist.
     */
    public static Set<I18nProperty> getI18nProperties(String fileName) throws FileNotFoundException{
        Parser yyparser = new Parser(new FileReader(fileName));        
        return yyparser.getI18nProperties();
    }

}
